<?php
/**
 * Created by PhpStorm.
 * User: tengwei
 * Date: 2018/11/16
 * Time: 5:28 PM
 */
namespace app\controllers;
use common\widgets\Tool;
use common\services\sms;
use yii\web\Controller;
use Yii;

class MessageController extends BaseController
{
    /** @var \common\logics\message\MesgLogic $MesgService*/
    private $MesgService;

    public function init()
    {
        $this->MesgService = Yii::$container->get('MesgService');
        parent::init();
    }

    public function actionSms()
    {
        $param = [
            'phone' => Yii::$app->request->post('phone'),
            'smstype' => Yii::$app->request->post('smstype'),
        ];
        $message = $this->MesgService->smsApi($param);
        return $message;
    }

}